package com.lc.activiti.sys.service.impl;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lc.activiti.config.Result;
import com.lc.activiti.sys.dao.SysMessageDao;
import com.lc.activiti.sys.entity.SysMessage;
import com.lc.activiti.sys.service.SysMessageService;
import org.springframework.stereotype.Service;

/**
 * (SysMessage)表服务实现类
 *
 * @author 骆超
 * @since 2021-07-07 10:26:08
 */
@Service("sysMessageService")
public class SysMessageServiceImpl extends ServiceImpl<SysMessageDao, SysMessage> implements SysMessageService {
    @Override
    public Result seenMessage(SysMessage sysMessage) {
        update(Wrappers.lambdaUpdate(SysMessage.class).eq(SysMessage::getId,sysMessage.getId()).set(SysMessage::getReadStatus,1));
        return Result.success(sysMessage);
    }
}
